<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>All Merchant List</title>
<%@include file="/common.jsp"%>
</head>
<body>
<h1 style="text-align: center">Merchant List</h1>
<hr/>
	<div style="text-align:center">
	<button onclick="{location.href='pass'}" class="btn1"> Pass </button>
	<button onclick="{location.href='pendingList'}" class="btn2"> In Process </button>
	<button onclick="{location.href='reject'}" class="btn3"> Reject </button>
	</div>
<br/>
	<div>
		<table align="center">
			<tr>
			<th width="60px;">Index</th>
			<th width="150px;">Name</th>
			<th width="220px;">Address</th>
			<th width="100px;">Status</th>
			<th width="80px;">Check Detail</th>
			</tr>
			<c:forEach items="${merchant }" var="m" varStatus="status">
			<tr>
				<td>${status.index+1 }</td>
				<td>${m.name }</td>
				<td>${m.address }</td>
				<td>
					<c:if test="${m.status==0 }">In Process</c:if>
					<c:if test="${m.status==1 }">Pass</c:if>
					<c:if test="${m.status==2 }">Reject</c:if>
				</td>
				<td><button onclick="{location.href='detail?mid=${m.id}'}" class="detail">Check</button></td>
			</tr>
			</c:forEach>
		</table>
	</div>
</body>
</html>